package com.hzbank.generate.a_limit;

import com.hzbank.generate.a_limit.vo.Strategy;
import com.hzbank.generate.a_limit.vo.dto.LimitCodeDetail;
import org.springframework.stereotype.Service;

import java.math.BigInteger;
import java.util.List;

@Service
public class ApiLimitCodeImpl implements ApiLimitCode{
    @Override
    public String addLimitCode(LimitCodeDetail limitCodeDetail) {
        //（1）判断输入是否为空
        //主子额度管理类型
        String tmanageType = limitCodeDetail.getManageType();
        //预约额度
        BigInteger ttotalLimit = limitCodeDetail.getTotalLimit();
        //普通额度
        BigInteger tnormalLimit = limitCodeDetail.getNormalLimit();

        if (tmanageType == null || ttotalLimit == null || tnormalLimit == null){
            return "字段为空或非法！";
        }

        //（2）生成额度代码（额度代码以LC+8序列，由IdCreator生成）

        //（等级产品额度基本信息表）


        return "ok";
    }

    @Override
    public void deleteLimitCode(String limitCode) {

    }

    @Override
    public void updateLimitCode(String limitCode, LimitCodeDetail limitCodeDetail) {

    }

    @Override
    public LimitCodeDetail getLimitCodeDetails(String limitCode) {
        return null;
    }

    @Override
    public List<String> getLimitCodeDimension(String limitCode) {
        return null;
    }

    @Override
    public List<Strategy> getLimitCodeStrategy(String limitCode, String strategyType) {
        return null;
    }

    @Override
    public String getCurHitRuleVer(String limitCode) {
        return null;
    }
}
